﻿<%@ Page Title="Registrar Solicitud de Prestamo" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SolicitudPrestamos.aspx.cs" Inherits="Triunfadores.Web.Prestamos.SolicitudPrestamos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    
    <div class="row">
        <div class="col-lg-6">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">Cliente</h3>
                    <div class="box-tools">
                        <div class="input-group">
                            <asp:TextBox ID="tbxDniCliente" CssClass="form-control input-sm pull-right" placeholder="Ingresa DNI del cliente" MaxLength="8" runat="server" />
                            <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender" TargetControlID="tbxDniCliente"
                                            FilterType="Numbers" runat="server"></ajaxToolkit:FilteredTextBoxExtender>
                            <div class="input-group-btn">
                                <asp:Button ID="btnBuscarCliente" CssClass="btn btn-sm btn-default" Text="Buscar" 
                                    runat="server" OnClick="btnBuscarCliente_Click" OnClientClick="myfunction(); return false;" />
                            </div>
                        </div>
                        <div class="box-tools pull-right">
                            <strong>
                                <asp:Label CssClass="pull-right" ID="lblFecha" Text="" runat="server" />
                            </strong>
                        </div>
                    </div>
                </div>
                <div class="box-body">
                    <asp:UpdatePanel ID="upDatosCliente" runat="server">
                        <ContentTemplate>
                            <div class="form-group">
                                <div class="col-sm-6">
                                    <asp:Label CssClass="message-error" ID="lblError" Text="" runat="server" />
                                    <address>
                                        <strong>Datos</strong><br />
                                        <asp:Label ID="lblNombreCliente" Text="" runat="server" /><br />
                                        <abbr title="Dni">DNI:&nbsp;</abbr><asp:Label ID="lblDniCliente" Text="" runat="server" /><br />
                                        <abbr title="Phone">Cel:&nbsp;</abbr><asp:Label ID="lblTelefonoCliente" Text="" runat="server" /><br />
                                    </address>
                                    <address>
                                        <strong>Dirección</strong><br />
                                        <asp:Label ID="lblDireccionCliente" Text="" runat="server" />
                                    </address>
                                    <address>
                                        <strong>E-mail</strong><br />
                                        <asp:Label ID="lblEmailCliente" Text="" runat="server" />
                                    </address>
                                </div>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnBuscarCliente" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </div>
        </div>
        <div class="col-lg-6">
            <asp:FormView CssClass="col-xs-12"
                DefaultMode="Insert"
                ID="fvSolicitudPrestamo"
                ItemType="Triunfadores.BusinessEntities.SolicitudPrestamo"
                runat="server"
                InsertMethod="RegistrarSolicitudPrestamo">
                <InsertItemTemplate>
                    <div class="box box-warning">
                        <div class="box-header with-border">
                            <h3 class="box-title">Datos de Solicitud</h3>
                        </div>
                        <div class="box-body">
                            <div class="form-group">
                                <asp:TextBox CssClass="form-control" ID="tbxIdSocio" runat="server" Text="<%#BindItem.Id %>" Visible="False" />
                            </div>
                            <div class="form-group">
                                <label>Cantidad</label>
                                <asp:TextBox CssClass="form-control" ID="tbxCantidad" runat="server" Text="<%#BindItem.Cantidad %>" />
                                <asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator1" runat="server"
                                    ControlToValidate="tbxCantidad" ErrorMessage="Campo Necesario" ForeColor="Red"></asp:RequiredFieldValidator>
                                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" TargetControlID="tbxCantidad"
                                    FilterType="Numbers, Custom" ValidChars="." runat="server"></ajaxToolkit:FilteredTextBoxExtender>
                            </div>
                            <%--<div class="form-group">
                        <label class="col-sm-2 control-label">Fecha Solicitud</label>
                        <div class="col-sm-4">
                            <asp:TextBox ID="tbxFechSolicitud" runat="server" Text="<%#BindItem.FechSolicitud %>" />
                        </div>
                    </div>--%>
                            <div class="form-group">
                                <label>Tasa Interes</label>
                                <asp:TextBox CssClass="form-control" ID="tbxTasaInteres" runat="server" Text="<%#BindItem.TasaInteres %>" />
                                <asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator2" runat="server"
                                    ControlToValidate="tbxTasaInteres" ErrorMessage=" Campo Necesario" ForeColor="Red"></asp:RequiredFieldValidator>
                                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" TargetControlID="tbxTasaInteres"
                                    FilterType="Numbers, Custom" ValidChars="." runat="server"></ajaxToolkit:FilteredTextBoxExtender>
                            </div>
                            <div class="form-group">
                                <label>Tipo de Pago</label>
                                <%--<asp:TextBox ID="tbxTipoPago" runat="server" Text="<%#BindItem.TipoPago %>" />--%>
                                <asp:DropDownList CssClass="form-control" ID="ddlTipoPago" runat="server">
                                    <asp:ListItem Text="Quincenal" />
                                    <asp:ListItem Text="Mensual" />
                                    <asp:ListItem Text="Trimestral" />
                                </asp:DropDownList>
                            </div>
                            <div class="form-group">
                                <label>Comentario</label>
                                <asp:TextBox CssClass="form-control" ID="tbxComentario" runat="server" Text="<%#BindItem.Comentario %>" TextMode="MultiLine" />
                            </div>
                            <%--<div class="form-group">
                        <label class="col-sm-2 control-label">Estado</label>
                        <div class="col-sm-4">
                            <asp:TextBox ID="tbxEstado" runat="server" Text="<%#BindItem.Estado %>" Enabled="True"/>
                        </div>
                    </div>--%>
                        </div>
                        <div class="box-footer">
                            <div class="pull-right">
                                <a href="GestionarSolicitudPrestamos.aspx" class="btn btn-default"
                                    onclick='return confirm("¿Esta seguro que desea salir? Los datos se perderan");'>Salir</a>
                                <asp:Button ID="btnGuardar" class="btn btn-primary" CommandName="insert" Text="Guardar" runat="server" />
                            </div>
                        </div>
                    </div>
                </InsertItemTemplate>

            </asp:FormView>

        </div>
    </div>

</asp:Content>
